package com.swang.pms.web.controller.manage;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.swang.pms.model.annotation.PltLog;
import com.swang.pms.model.common.Pager;
import com.swang.pms.model.dto.PlfLogDto;
import com.swang.pms.service.manage.ManageLogService;
import com.swang.pms.web.controller.BaseController;

/**
 * @ClassName: ManageLogController
 * @Description: 日志服务控制层
 * @author 王泽
 * @date 2017年3月16日 下午9:45:51
 */
@Controller
@RequestMapping("/plfLog")
public class ManageLogController extends BaseController {

    @Resource
    private ManageLogService manageLogService;

    @RequestMapping(value = "/page")
    public ModelAndView openLogPage(ModelMap model) {
        return new ModelAndView("sys/plfLog/plfLogMgr", model);
    }

    @PltLog(log = "分页查询日志信息列表")
    @RequestMapping("/findPageGrid")
    @ResponseBody
    public Pager findPageGrid(@ModelAttribute Pager pager, PlfLogDto dto) {
        return this.manageLogService.findPageGrid(pager, dto);
    }

    @RequestMapping(value = "/openLogDetailPage")
    public ModelAndView openLogDetailPage(ModelMap model) {
        return new ModelAndView("sys/plfLog/win/plfLogDetail", model);
    }
}
